import Vue from "vue";
import App from "./App.vue";
import router from "@/router";
import store from "@/store";
import TypeNav from "@/components/TypeNav";
import Pagination from "@/components/Pagination";
import API from "@/api";
import VueLazyload from "vue-lazyload";
import img from "@/assets/images/loading.gif";
import "@/utils/veeValidate";
import { Button, Message, MessageBox } from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import "@/mock";
Vue.component(TypeNav.name, TypeNav);
Vue.use(Button);
Vue.use(VueLazyload, {
  loading: img,
});
Vue.component(Pagination.name, Pagination);
Vue.config.productionTip = false;
Vue.prototype.$message = Message;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;

new Vue({
  beforeCreate() {
    Vue.prototype.$bus = this;
    Vue.prototype.$API = API;
  },
  render: (h) => h(App),
  router,
  store,
}).$mount("#app");
